/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package customer_jdom;

import commands.ICommandContextuelle;
import entities.Account;

/**
 *
 * eCOM - Adopte un Presta - Mars-Avril 2013
 * @author Kheira, Jef, William, Tuan-Long
 */
public class LoginJDOM 
{
    	private final ICommandContextuelle command;
	public static final String ENV_AUTH = "AUTH";

	public LoginJDOM(ICommandContextuelle command) 
        {
		this.command = command;		
	}

	public boolean hasIdentity() 
        {
            return command.getContext().getVar(ENV_AUTH) != null;
	}

	public Account getIdentity() 
        {
            return (Account) command.getContext().getVar(ENV_AUTH);
	}

}
